package cn.itcast.bos.action.base;

import java.util.List;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import cn.itcast.bos.domain.base.TakeTime;
import cn.itcast.bos.service.base.ITakeTimeService;

/** 
 * 快递员上班时间的操作类
 *
 * @author Shao-Fei Fan 
 * @version 1.0,2017年9月9日 下午9:44:41 
 */
@Controller
@Scope("prototype")
@ParentPackage("json-default")
@Namespace("/")
public class TakeTimeAction extends BaseAction<TakeTime> {
	
	@Autowired
	private ITakeTimeService takeTimeService;
	
	@Action(value="takeTime_findAll",results={@Result(name="success",type="json")})
	public String takeTime_findnoAll(){
		
		List<TakeTime> takeTimes  = takeTimeService.findAll();
		ServletActionContext.getContext().getValueStack().push(takeTimes);
		return SUCCESS;
	}

	
}
